public class GPSCoordinates
{
	int xPosition;
	int yPosition;
	Object mutex = new Object();
	
	public GPSCoordinates(int x, int y)
	{
		xPosition = x;
		yPosition = y;
	}
	
	public void changePosition(int newX, int newY)
	{
		synchronized (mutex)
		{
			xPosition = newX;
			yPosition = newY;
		}
	}
	
	public int getX()
	{
		synchronized (mutex)
		{
			return xPosition;
		}
	}
	
	public int getY()
	{
		synchronized (mutex)
		{
			return yPosition;
		}
	}
}
